package sun.superstring.thisdemo;

public class StudentDemo {
    // 成员变量
    String name;
    double score;

    public StudentDemo(){
    }
    public StudentDemo(String name, double score){
        this.name = name;
        this.score = score;

    }

    // 方法中的变量，都称为局部变量
    public void checkPass(double score){
        if(this.score >= score){
            System.out.println("恭喜您，考上哈佛，走上巅峰~~~");
        }else{
            System.out.println("不好意思，您没有考上");
        }
    }
}
